/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.compomics.consoleformatter;

import com.compomics.fastagenerator.fastagrabber.consoleformatter.PercentValue;
import com.compomics.fastagenerator.fastagrabber.consoleformatter.Spinner;
import java.util.Scanner;

/**
 *
 * @author Kenneth Verheggen
 */
public class PercentTester {

    public static void main(String args[]) {

        try {
            Spinner spinner = new Spinner();
            System.out.println("");
            System.out.println("Regular Spinner");
            System.out.println("");
            spinner.startSpinner();
            Thread.sleep(5000);
            spinner.stopSpinner(true);
        } catch (Exception ex) {
            if (ex.getMessage().contains("formatter found for console")) {
                System.out.println("Impossible to run this application in an IDE...Please try again using the commandline");
                System.exit(1);
            }
            ex.printStackTrace();
        }

        System.out.println("");
        System.out.println("Regular percentBar with prefix and suffix (max = 100, increment 1)");
        System.out.println("");

        PercentValue percent = new PercentValue(100);
        percent.setSurroundMessage("TEST : ", " For Kenneth");
        for (int i = 0; i <= 100; i++) {
            percent.increasePercent(1);
        }

        System.out.println("");
        System.out.println("Regular percentBar with prefix and suffix (max = 300, increment 2)");
        System.out.println("");
        PercentValue percent2 = new PercentValue(300);
        percent2.setSurroundMessage("TEST : ", " For Kenneth 2");
        for (int i = 0; i <= 300; i++) {
            percent2.increasePercent(2);
        }

        System.out.println("");
        Scanner scan = new Scanner(System.in);
        String scanIn = scan.nextLine();


    }
}
